//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================

#ifndef __CDIRSTRENUMERATOR_H__
#define __CDIRSTRENUMERATOR_H__

#ifndef __UUNM_elasys_DEFINED__
#define __UUNM_elasys_DEFINED__
#ifdef __cplusplus
static const wchar_t * const c_pelasysUunm = \
    L"elastos.dll";
#else

#define c_pelasysUunm L"elastos.dll"
#endif
// __cplusplus
#endif // __UUNM_elasys_DEFINED__

#ifndef __ECLSID_CDirStrEnumerator_DEFINED__
#define __ECLSID_CDirStrEnumerator_DEFINED__
static const ClassID ECLSID_CDirStrEnumerator = {
    {0x61181837,0x2CCC,0xC6D9,{0x7E,0xA0,0x78,0x41,0xC2,0x06,0x0F,0x1B}},
    (wchar_t *)c_pelasysUunm };
#endif // __CLSID_CDirStrEnumerator_DEFINED__
//#include <aura.h>

class CDirStrEnumerator : public IWStringEnumerator
{
public:
    CARAPI_(PInterface) Probe(
         /* [in]  */ REIID riid);

    CARAPI_(UInt32) AddRef(void);

    CARAPI_(UInt32) Release(void);

    CARAPI Aggregate(
        /* [in] */ AggrType aggrType,
        /* [in] */ PInterface pObject);

    CARAPI GetDomain(
         /* [out] */ PInterface *ppObj);

    CARAPI Current(
        /* [out] */ WStringBuf * pPsa);

    CARAPI MoveNext();

    CARAPI Reset();

    CDirStrEnumerator();
    CDirStrEnumerator(wchar_t *wcsPathName);
    virtual ~CDirStrEnumerator();

private:
    // TODO: Add you private member variables here
    wchar_t* m_wstrPathName;
    _ELASTOS Boolean m_bReset;
    _ELASTOS Boolean m_bMove;
    wchar_t m_wcsFileName[MAX_PATH];
    HANDLE m_hFind;
    Interlocked     m_cRef;
};

#endif // __CDIRSTRENUMERATOR_H__
